<%@ page import="eu.reply.flashmob.Event" %>



<div class="fieldcontain ${hasErrors(bean: eventInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="event.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${eventInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: eventInstance, field: 'date', 'error')} required">
	<label for="date">
		<g:message code="event.date.label" default="Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="date" format="yyyy-MM-dd HH:mm" precision="minute"  value="${eventInstance?.date}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: eventInstance, field: 'location', 'error')} required">
	<label for="location">
		<g:message code="event.location.label" default="Location" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="location" required="" value="${eventInstance?.location}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: eventInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="event.description.label" default="Description" />
		
	</label>
	<g:textArea name="description" cols="40" rows="5" maxlength="50000" value="${eventInstance?.description}"/>
</div>

<g:if test="${attendees}">
	<div class="fieldcontain ${hasErrors(bean: eventInstance, field: 'attendees', 'error')} ">
		<label for="attendees">
			<g:message code="event.attendees.label" default="Attendees" />
			
		</label>
		<g:select name="attendees" from="${eu.reply.flashmob.UserProfile.list()}" multiple="multiple" optionKey="id" size="5" value="${eventInstance?.attendees*.id}" class="many-to-many"/>
	</div>
</g:if>
